package com.lagou.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(value = "lagou-service-code", fallback = CodeFeignClientFallback.class)
public interface CodeFeignClient {

    /**
     * 校验验证码是否正确，0正确 1错误 2超时 3未发送过验证码
     *
     * @param email
     * @param code
     * @return
     */
    @GetMapping("/code/validate/{email}/{code}")
    @ResponseBody
    public String validate(@PathVariable("email") String email, @PathVariable("code") String code);
}
